import request from "@/utils/request";

// 查询章节管理列表
export function listChapter(query) {
  return request({
    url: "/program/chapter/list",
    method: "get",
    params: query,
  });
}

// 查询章节管理详细
export function getChapter(chapterId) {
  return request({
    url: "/program/chapter/" + chapterId,
    method: "get",
  });
}

// 新增章节管理
export function addChapter(data) {
  return request({
    url: "/program/chapter",
    method: "post",
    data: data,
  });
}

// 修改章节管理
export function updateChapter(data) {
  return request({
    url: "/program/chapter",
    method: "put",
    data: data,
  });
}

// 删除章节管理
export function delChapter(chapterId) {
  return request({
    url: "/program/chapter/" + chapterId,
    method: "delete",
  });
}
